<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            background-color: pink;
            margin-top: 200px;
            margin-left: 420px;
        }
        .comment {
            float: left;
            width: 200px;
            height: 300px;
            line-height: 300px;
            background-color: #000;
            margin-right: 15px;
            color: #fff;
            font-size: 150px;
            text-align: center;
            border-radius: 15px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="comment hour">00</div>
        <div class="comment minute">00</div>
        <div class="comment second">00</div>
    </div>
    <script>
        var hour = document.querySelector('.hour');
        var minute = document.querySelector('.minute');
        var second = document.querySelector('.second');
        time();
        function time (){
            var date = new Date();
            var h = date.getHours();
            h = h < 10 ? "0"+h : h;
            var m = date.getMinutes();
            m = m < 10 ? "0"+m : m;
            var s = date.getSeconds();
            s = s < 10 ? "0"+s : s;
            hour.innerHTML = h;
            minute.innerHTML = m;
            second.innerHTML = s;
        }
        var time1 = setInterval(function(){
            time();
        },1000);
    </script>
</body>
</html>